package interfazGrafica;

import java.awt.Dimension;

import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.JSeparator;
import java.awt.Color;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.SwingConstants;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.SystemColor;

public class CuentasAdm extends JPanel{
	private JTable tablaCierresDeCaja;
	private JTable tablaIngresos;
	private JTable tablaEgresos;
	private JTextField textFieldTotalIngresos;
	private JTextField textFieldTotalEgresos;
	private JTextField textFieldTotalCierresDeCaja;
	private JTextField textFieldSaldoMes;
	
	public CuentasAdm() {
		
		try{UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");}
		catch(Exception e) {}
		
		setPreferredSize(new Dimension(1024, 768));
		setSize(new Dimension(1024, 768));
		setMinimumSize(new Dimension(1024, 768));
		setLayout(null);
		
		JSeparator separator = new JSeparator();
		separator.setForeground(Color.LIGHT_GRAY);
		separator.setBounds(27, 35, 40, 1);
		add(separator);
		
		JLabel lblTurnos = new JLabel("Cierres de Caja");
		lblTurnos.setHorizontalAlignment(SwingConstants.CENTER);
		lblTurnos.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblTurnos.setBounds(65, 26, 116, 21);
		add(lblTurnos);
		
		JSeparator separator_1 = new JSeparator();
		separator_1.setOrientation(SwingConstants.VERTICAL);
		separator_1.setForeground(Color.LIGHT_GRAY);
		separator_1.setBounds(27, 35, 1, 599);
		add(separator_1);
		
		JSeparator separator_2 = new JSeparator();
		separator_2.setForeground(Color.LIGHT_GRAY);
		separator_2.setBounds(180, 35, 233, 1);
		add(separator_2);
		
		JSeparator separator_3 = new JSeparator();
		separator_3.setOrientation(SwingConstants.VERTICAL);
		separator_3.setForeground(Color.LIGHT_GRAY);
		separator_3.setBounds(413, 35, 1, 599);
		add(separator_3);
		
		JSeparator separator_4 = new JSeparator();
		separator_4.setForeground(Color.LIGHT_GRAY);
		separator_4.setBounds(27, 633, 386, 1);
		add(separator_4);
		
		JSeparator separator_5 = new JSeparator();
		separator_5.setForeground(Color.LIGHT_GRAY);
		separator_5.setBounds(443, 35, 40, 1);
		add(separator_5);
		
		JLabel lblIngresos = new JLabel("Ingresos");
		lblIngresos.setHorizontalAlignment(SwingConstants.CENTER);
		lblIngresos.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblIngresos.setBounds(480, 26, 81, 21);
		add(lblIngresos);
		
		JSeparator separator_6 = new JSeparator();
		separator_6.setOrientation(SwingConstants.VERTICAL);
		separator_6.setForeground(Color.LIGHT_GRAY);
		separator_6.setBounds(443, 35, 1, 261);
		add(separator_6);
		
		JSeparator separator_7 = new JSeparator();
		separator_7.setForeground(Color.LIGHT_GRAY);
		separator_7.setBounds(560, 35, 219, 1);
		add(separator_7);
		
		JSeparator separator_8 = new JSeparator();
		separator_8.setOrientation(SwingConstants.VERTICAL);
		separator_8.setForeground(Color.LIGHT_GRAY);
		separator_8.setBounds(778, 35, 1, 261);
		add(separator_8);
		
		JSeparator separator_9 = new JSeparator();
		separator_9.setForeground(Color.LIGHT_GRAY);
		separator_9.setBounds(443, 295, 336, 1);
		add(separator_9);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(45, 53, 350, 562);
		add(scrollPane);
		
		tablaCierresDeCaja = new JTable();
		scrollPane.setViewportView(tablaCierresDeCaja);
		tablaCierresDeCaja.setModel(new DefaultTableModel(
			new Object[][] {
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
			},
			new String[] {
				"Fecha", "Turno", "Usuario", "Importe"
			}
		) {
			boolean[] columnEditables = new boolean[] {
				false, false, false, false
			};
			public boolean isCellEditable(int row, int column) {
				return columnEditables[column];
			}
		});
		tablaCierresDeCaja.getColumnModel().getColumn(0).setResizable(false);
		tablaCierresDeCaja.getColumnModel().getColumn(0).setPreferredWidth(50);
		tablaCierresDeCaja.getColumnModel().getColumn(1).setResizable(false);
		tablaCierresDeCaja.getColumnModel().getColumn(1).setPreferredWidth(50);
		tablaCierresDeCaja.getColumnModel().getColumn(2).setResizable(false);
		tablaCierresDeCaja.getColumnModel().getColumn(2).setPreferredWidth(70);
		tablaCierresDeCaja.getColumnModel().getColumn(3).setResizable(false);
		tablaCierresDeCaja.getColumnModel().getColumn(3).setPreferredWidth(70);
		
		JScrollPane scrollPane_1 = new JScrollPane();
		scrollPane_1.setBounds(461, 53, 300, 225);
		add(scrollPane_1);
		
		tablaIngresos = new JTable();
		scrollPane_1.setViewportView(tablaIngresos);
		tablaIngresos.setModel(new DefaultTableModel(
			new Object[][] {
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
			},
			new String[] {
				"Detalle", "Importe"
			}
		));
		tablaIngresos.getColumnModel().getColumn(0).setPreferredWidth(150);
		tablaIngresos.getColumnModel().getColumn(1).setPreferredWidth(30);
		
		JSeparator separator_10 = new JSeparator();
		separator_10.setForeground(Color.LIGHT_GRAY);
		separator_10.setBounds(443, 372, 40, 1);
		add(separator_10);
		
		JLabel lblEgresos = new JLabel("Egresos");
		lblEgresos.setHorizontalAlignment(SwingConstants.CENTER);
		lblEgresos.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblEgresos.setBounds(480, 364, 81, 21);
		add(lblEgresos);
		
		JSeparator separator_11 = new JSeparator();
		separator_11.setOrientation(SwingConstants.VERTICAL);
		separator_11.setForeground(Color.LIGHT_GRAY);
		separator_11.setBounds(443, 372, 1, 261);
		add(separator_11);
		
		JSeparator separator_12 = new JSeparator();
		separator_12.setForeground(Color.LIGHT_GRAY);
		separator_12.setBounds(560, 372, 219, 1);
		add(separator_12);
		
		JSeparator separator_13 = new JSeparator();
		separator_13.setOrientation(SwingConstants.VERTICAL);
		separator_13.setForeground(Color.LIGHT_GRAY);
		separator_13.setBounds(778, 372, 1, 261);
		add(separator_13);
		
		JSeparator separator_14 = new JSeparator();
		separator_14.setForeground(Color.LIGHT_GRAY);
		separator_14.setBounds(443, 633, 336, 1);
		add(separator_14);
		
		JLabel lblTotalIngresos = new JLabel("Total Ingresos:  $");
		lblTotalIngresos.setVerticalAlignment(SwingConstants.TOP);
		lblTotalIngresos.setHorizontalAlignment(SwingConstants.RIGHT);
		lblTotalIngresos.setFont(new Font("Tahoma", Font.PLAIN, 12));
		lblTotalIngresos.setBounds(462, 312, 235, 26);
		add(lblTotalIngresos);
		
		textFieldTotalIngresos = new JTextField();
		textFieldTotalIngresos.setText("30.00");
		textFieldTotalIngresos.setHorizontalAlignment(SwingConstants.CENTER);
		textFieldTotalIngresos.setFont(new Font("Tahoma", Font.PLAIN, 12));
		textFieldTotalIngresos.setEditable(false);
		textFieldTotalIngresos.setColumns(10);
		textFieldTotalIngresos.setBounds(701, 307, 78, 26);
		add(textFieldTotalIngresos);
		
		JLabel lblTotalEgresos = new JLabel("Total Egresos:  $");
		lblTotalEgresos.setHorizontalAlignment(SwingConstants.RIGHT);
		lblTotalEgresos.setFont(new Font("Tahoma", Font.PLAIN, 12));
		lblTotalEgresos.setBounds(461, 645, 235, 26);
		add(lblTotalEgresos);
		
		textFieldTotalEgresos = new JTextField();
		textFieldTotalEgresos.setText("30.00");
		textFieldTotalEgresos.setHorizontalAlignment(SwingConstants.CENTER);
		textFieldTotalEgresos.setFont(new Font("Tahoma", Font.PLAIN, 12));
		textFieldTotalEgresos.setEditable(false);
		textFieldTotalEgresos.setColumns(10);
		textFieldTotalEgresos.setBounds(700, 645, 78, 26);
		add(textFieldTotalEgresos);
		
		JLabel lblTotalTurnos = new JLabel("Total Cierres de Caja:  $");
		lblTotalTurnos.setHorizontalAlignment(SwingConstants.RIGHT);
		lblTotalTurnos.setFont(new Font("Tahoma", Font.PLAIN, 12));
		lblTotalTurnos.setBounds(96, 645, 235, 26);
		add(lblTotalTurnos);
		
		textFieldTotalCierresDeCaja = new JTextField();
		textFieldTotalCierresDeCaja.setText("30.00");
		textFieldTotalCierresDeCaja.setHorizontalAlignment(SwingConstants.CENTER);
		textFieldTotalCierresDeCaja.setFont(new Font("Tahoma", Font.PLAIN, 12));
		textFieldTotalCierresDeCaja.setEditable(false);
		textFieldTotalCierresDeCaja.setColumns(10);
		textFieldTotalCierresDeCaja.setBounds(335, 645, 78, 26);
		add(textFieldTotalCierresDeCaja);
		
		JScrollPane scrollPane_2 = new JScrollPane();
		scrollPane_2.setBounds(461, 390, 300, 225);
		add(scrollPane_2);
		
		tablaEgresos = new JTable();
		scrollPane_2.setViewportView(tablaEgresos);
		tablaEgresos.setModel(new DefaultTableModel(
			new Object[][] {
				{"", null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
				{null, null},
			},
			new String[] {
				"Detalle", "Importe"
			}
		));
		
		JLabel lblSaldoEnCaja = new JLabel("Saldo del Mes:  $");
		lblSaldoEnCaja.setVerticalAlignment(SwingConstants.TOP);
		lblSaldoEnCaja.setHorizontalAlignment(SwingConstants.RIGHT);
		lblSaldoEnCaja.setFont(new Font("Tahoma", Font.BOLD, 14));
		lblSaldoEnCaja.setBounds(811, 731, 116, 26);
		add(lblSaldoEnCaja);
		
		textFieldSaldoMes = new JTextField();
		textFieldSaldoMes.setText("110.00");
		textFieldSaldoMes.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldSaldoMes.setFont(new Font("Tahoma", Font.BOLD, 14));
		textFieldSaldoMes.setEditable(false);
		textFieldSaldoMes.setColumns(10);
		textFieldSaldoMes.setBorder(null);
		textFieldSaldoMes.setBounds(928, 732, 63, 14);
		add(textFieldSaldoMes);
		
		JSeparator separator_15 = new JSeparator();
		separator_15.setForeground(Color.GRAY);
		separator_15.setBounds(811, 726, 180, 1);
		add(separator_15);
		
		JSeparator separator_16 = new JSeparator();
		separator_16.setForeground(Color.GRAY);
		separator_16.setBounds(811, 753, 180, 1);
		add(separator_16);
		
		JButton botonEliminarEgreso = new JButton("Eliminar Egreso");
		botonEliminarEgreso.setForeground(Color.BLACK);
		botonEliminarEgreso.setFont(new Font("Tahoma", Font.PLAIN, 12));
		botonEliminarEgreso.setBorder(UIManager.getBorder("Button.border"));
		botonEliminarEgreso.setBackground(SystemColor.activeCaptionBorder);
		botonEliminarEgreso.setBounds(811, 545, 180, 26);
		add(botonEliminarEgreso);
		
		JButton botonAgregarEgreso = new JButton("Agregar Egreso");
		botonAgregarEgreso.setForeground(Color.BLACK);
		botonAgregarEgreso.setFont(new Font("Tahoma", Font.PLAIN, 12));
		botonAgregarEgreso.setBorder(UIManager.getBorder("Button.border"));
		botonAgregarEgreso.setBackground(SystemColor.activeCaptionBorder);
		botonAgregarEgreso.setBounds(811, 434, 180, 26);
		add(botonAgregarEgreso);
		
		JButton botonModificarEgreso = new JButton("Modificar Egreso");
		botonModificarEgreso.setForeground(Color.BLACK);
		botonModificarEgreso.setFont(new Font("Tahoma", Font.PLAIN, 12));
		botonModificarEgreso.setBorder(UIManager.getBorder("Button.border"));
		botonModificarEgreso.setBackground(SystemColor.activeCaptionBorder);
		botonModificarEgreso.setBounds(811, 471, 180, 26);
		add(botonModificarEgreso);
		
		JButton botonVerEgreso = new JButton("Ver Egreso");
		botonVerEgreso.setForeground(Color.BLACK);
		botonVerEgreso.setFont(new Font("Tahoma", Font.PLAIN, 12));
		botonVerEgreso.setBorder(UIManager.getBorder("Button.border"));
		botonVerEgreso.setBackground(SystemColor.activeCaptionBorder);
		botonVerEgreso.setBounds(811, 508, 180, 26);
		add(botonVerEgreso);
		
		JButton botonEliminarIngreso = new JButton("Eliminar Ingreso");
		botonEliminarIngreso.setForeground(Color.BLACK);
		botonEliminarIngreso.setFont(new Font("Tahoma", Font.PLAIN, 12));
		botonEliminarIngreso.setBorder(UIManager.getBorder("Button.border"));
		botonEliminarIngreso.setBackground(SystemColor.activeCaptionBorder);
		botonEliminarIngreso.setBounds(811, 208, 180, 26);
		add(botonEliminarIngreso);
		
		JButton botonAgregarIngreso = new JButton("Agregar Ingreso");
		botonAgregarIngreso.setForeground(Color.BLACK);
		botonAgregarIngreso.setFont(new Font("Tahoma", Font.PLAIN, 12));
		botonAgregarIngreso.setBorder(UIManager.getBorder("Button.border"));
		botonAgregarIngreso.setBackground(SystemColor.activeCaptionBorder);
		botonAgregarIngreso.setBounds(811, 97, 180, 26);
		add(botonAgregarIngreso);
		
		JButton botonModificarIngreso = new JButton("Modificar Ingreso");
		botonModificarIngreso.setForeground(Color.BLACK);
		botonModificarIngreso.setFont(new Font("Tahoma", Font.PLAIN, 12));
		botonModificarIngreso.setBorder(UIManager.getBorder("Button.border"));
		botonModificarIngreso.setBackground(SystemColor.activeCaptionBorder);
		botonModificarIngreso.setBounds(811, 134, 180, 26);
		add(botonModificarIngreso);
		
		JButton botonVerIngreso = new JButton("Ver Ingreso");
		botonVerIngreso.setForeground(Color.BLACK);
		botonVerIngreso.setFont(new Font("Tahoma", Font.PLAIN, 12));
		botonVerIngreso.setBorder(UIManager.getBorder("Button.border"));
		botonVerIngreso.setBackground(SystemColor.activeCaptionBorder);
		botonVerIngreso.setBounds(811, 171, 180, 26);
		add(botonVerIngreso);
		
		JButton botonGenerarCierre = new JButton("Generar Cierre de Mes");
		botonGenerarCierre.setForeground(Color.BLACK);
		botonGenerarCierre.setFont(new Font("Tahoma", Font.PLAIN, 12));
		botonGenerarCierre.setBorder(UIManager.getBorder("Button.border"));
		botonGenerarCierre.setBackground(SystemColor.activeCaptionBorder);
		botonGenerarCierre.setBounds(811, 645, 180, 26);
		add(botonGenerarCierre);
		tablaEgresos.getColumnModel().getColumn(0).setPreferredWidth(150);
		tablaEgresos.getColumnModel().getColumn(1).setPreferredWidth(30);
		
	}
}